/***********************************************************************
 * POJO Class :  SysPermission.java
 * Author:  Bill Vison
 * Purpose: Defines the Class SysPermission
 ***********************************************************************/

package org.vsg.security.model.domain;

@javax.persistence.Entity
@javax.persistence.Table(name = "RES_ASSOCIATION")
public class ResourceAssociation implements java.io.Serializable,java.lang.Cloneable {


	@javax.persistence.Column(name ="id")	@javax.persistence.Id
	@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.IDENTITY)			

	private long id;
	 
	@javax.persistence.ManyToOne( cascade = { javax.persistence.CascadeType.MERGE},fetch = javax.persistence.FetchType.LAZY )
@javax.persistence.JoinColumn(name="id_resource")		
	private SysResource resource;
	 
	@javax.persistence.ManyToOne( cascade = { javax.persistence.CascadeType.MERGE},fetch = javax.persistence.FetchType.LAZY )
@javax.persistence.JoinColumn(name="id_operation")		
	private SysOperation operation;
	 
	@javax.persistence.ManyToOne( cascade = { javax.persistence.CascadeType.MERGE},fetch = javax.persistence.FetchType.LAZY )
@javax.persistence.JoinColumn(name="id_role")		
	private SysRole role;
	 


	
	/**
	 * @param newId
	 */	
	public void setId(long newId) {
		id = newId;
	}
	
	public long getId() {
		return id;
	}	
	
	/**
	 * @param newResource
	 */	
	public void setResource(SysResource newResource) {
		resource = newResource;
	}
	
	public SysResource getResource() {
		return resource;
	}	
	
	/**
	 * @param newOperation
	 */	
	public void setOperation(SysOperation newOperation) {
		operation = newOperation;
	}
	
	public SysOperation getOperation() {
		return operation;
	}	
	
	/**
	 * @param newRole
	 */	
	public void setRole(SysRole newRole) {
		role = newRole;
	}
	
	public SysRole getRole() {
		return role;
	}	

}